/*     */ package com.iris.egrant.webapp.struts2.proposal;
/*     */ 
/*     */

import com.iris.egrant.app.utils.IrisStringUtils;
import com.iris.egrant.model.formInit.FormBaseLibrary;
import com.iris.egrant.model.proposal.ProposalCachedExtend;
import com.iris.egrant.remote.http.service.ServiceFactory;
import com.iris.egrant.service.ServiceUtils;
import com.iris.egrant.service.proposal.ProposalService;
import com.iris.egrant.web.struts2.Struts2Utils;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/*     */
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class EnterAction
/*     */   extends ActionSupport
/*     */ {
/*     */   private static final long serialVersionUID = 5834239721177326965L;
/*     */   private Long posCode;
/*     */   private Long grantCode;
/*     */   private Long subGrantCode;
/*     */   private String subGrantNo;
/*     */   private Long helpGrantCode;
/*     */   private String enterLocation;
/*     */   private Long formCode;
/*     */   private String xmlData;
/*     */   private String statYear;
/*     */   private ProposalCachedExtend pcx;
/*     */   private int seqNo;
/*     */   private Long menuId;
/*     */   private String needPrj;
/*     */   private Long prjCode;
/*     */   private String prjNo;
/*     */   private Map<String, Object> prjMap;
/*     */   private String pdfStatus;
/*     */   private String pdfFileCode;
/*     */   @Resource(name = "serviceFactory")
/*     */   private ServiceFactory serviceFactory;
/*     */   
/*     */   public String enterProposal() throws Exception {
/* 118 */     if (this.grantCode == null && this.posCode == null) {
/* 119 */       Struts2Utils.getResponse().sendRedirect(Struts2Utils.getRequest().getContextPath() + "/proposal/prp-edit-list");
/*     */       
/* 121 */       return null;
/*     */     } 
/*     */     
/* 124 */     Map<String, Object> params = new HashMap<String, Object>();
/* 125 */     params.put("grant_code", this.grantCode);
/* 126 */     if (this.subGrantCode == null) {
/* 127 */       params.put("sub_grant_no", this.subGrantNo);
/*     */     } else {
/* 129 */       params.put("sub_grant_code", this.subGrantCode);
/*     */     } 
/* 131 */     String orgCode = Struts2Utils.getParameter("orgCode");
/* 132 */     if (StringUtils.isNotBlank(orgCode)) {
/* 133 */       orgCode = ServiceUtils.decodeFromDes3(orgCode);
/* 134 */       if (NumberUtils.isNumber(orgCode)) {
/* 135 */         params.put("org_code", Long.valueOf(Long.parseLong(orgCode)));
/*     */       }
/*     */     } 
/*     */     
/* 139 */     params.put("help_grant_code", this.helpGrantCode);
/* 140 */     params.put("prj_code", this.prjCode);
/*     */     try {
/* 142 */       Map<String, Object> resultMap = ((ProposalService)this.serviceFactory.getService(ProposalService.class)).getPrpLoad(params, this.posCode);
/*     */       
/* 144 */       if (resultMap == null) {
/* 145 */         return "error";
/*     */       }
/*     */       
/* 148 */       FormBaseLibrary fbl = (FormBaseLibrary)resultMap.get("fbl");
/*     */ 
/*     */       
/* 151 */       this.formCode = fbl.getFormCode();
/* 152 */       this.enterLocation = fbl.getEditIndexUrl();
/* 153 */       this.xmlData = ObjectUtils.toString(resultMap.get("xmlData"));
/* 154 */       this.statYear = ObjectUtils.toString(resultMap.get("statYear"));
/* 155 */       this.pdfStatus = ObjectUtils.toString(resultMap.get("pdfStatus"));
/* 156 */       Struts2Utils.getRequest().setAttribute("fbl", fbl);
/* 157 */     } catch (Exception e) {
/* 158 */       LOG.error("读取申请书数据错误:posCode=" + this.posCode, e, new String[0]);
/* 159 */       throw e;
/*     */     } 
/* 161 */     return "enter";
/*     */   }
/*     */   
/*     */   public String getEnterLocation() {
/* 165 */     return this.enterLocation;
/*     */   }
/*     */   
/*     */   public void setEnterLocation(String enterLocation) {
/* 169 */     this.enterLocation = enterLocation;
/*     */   }
/*     */   
/*     */   public String getXmlData() {
/* 173 */     return this.xmlData;
/*     */   }
/*     */   
/*     */   public void setXmlData(String xmlData) {
/* 177 */     xmlData = IrisStringUtils.filterSupplementaryChars(xmlData);
/* 178 */     this.xmlData = xmlData;
/*     */   }
/*     */   
/*     */   public Long getMenuId() {
/* 182 */     return this.menuId;
/*     */   }
/*     */   
/*     */   public void setMenuId(Long menuId) {
/* 186 */     this.menuId = menuId;
/*     */   }
/*     */   
/*     */   public Long getPosCode() {
/* 190 */     return this.posCode;
/*     */   }
/*     */   
/*     */   public void setPosCode(Long posCode) {
/* 194 */     this.posCode = posCode;
/*     */   }
/*     */   
/*     */   public int getSeqNo() {
/* 198 */     return this.seqNo;
/*     */   }
/*     */   
/*     */   public void setSeqNo(int seqNo) {
/* 202 */     this.seqNo = seqNo;
/*     */   }
/*     */   
/*     */   public String getSubGrantNo() {
/* 206 */     return this.subGrantNo;
/*     */   }
/*     */   
/*     */   public void setSubGrantNo(String subGrantNo) {
/* 210 */     this.subGrantNo = subGrantNo;
/*     */   }
/*     */   
/*     */   public Long getGrantCode() {
/* 214 */     return this.grantCode;
/*     */   }
/*     */   
/*     */   public void setGrantCode(Long grantCode) {
/* 218 */     this.grantCode = grantCode;
/*     */   }
/*     */   
/*     */   public Long getFormCode() {
/* 222 */     return this.formCode;
/*     */   }
/*     */   
/*     */   public void setFormCode(Long formCode) {
/* 226 */     this.formCode = formCode;
/*     */   }
/*     */   
/*     */   public String getStatYear() {
/* 230 */     return this.statYear;
/*     */   }
/*     */   
/*     */   public void setStatYear(String statYear) {
/* 234 */     this.statYear = statYear;
/*     */   }
/*     */   
/*     */   public ProposalCachedExtend getPcx() {
/* 238 */     return this.pcx;
/*     */   }
/*     */   
/*     */   public void setPcx(ProposalCachedExtend pcx) {
/* 242 */     this.pcx = pcx;
/*     */   }
/*     */   
/*     */   public Long getSubGrantCode() {
/* 246 */     return this.subGrantCode;
/*     */   }
/*     */   
/*     */   public void setSubGrantCode(Long subGrantCode) {
/* 250 */     this.subGrantCode = subGrantCode;
/*     */   }
/*     */   
/*     */   public Long getHelpGrantCode() {
/* 254 */     return this.helpGrantCode;
/*     */   }
/*     */   
/*     */   public void setHelpGrantCode(Long helpGrantCode) {
/* 258 */     this.helpGrantCode = helpGrantCode;
/*     */   }
/*     */   
/*     */   public String getNeedPrj() {
/* 262 */     return this.needPrj;
/*     */   }
/*     */   
/*     */   public void setNeedPrj(String needPrj) {
/* 266 */     this.needPrj = needPrj;
/*     */   }
/*     */   
/*     */   public Long getPrjCode() {
/* 270 */     return this.prjCode;
/*     */   }
/*     */   
/*     */   public void setPrjCode(Long prjCode) {
/* 274 */     this.prjCode = prjCode;
/*     */   }
/*     */   
/*     */   public String getPrjNo() {
/* 278 */     return this.prjNo;
/*     */   }
/*     */   
/*     */   public void setPrjNo(String prjNo) {
/* 282 */     this.prjNo = prjNo;
/*     */   }
/*     */   
/*     */   public Map<String, Object> getPrjMap() {
/* 286 */     return this.prjMap;
/*     */   }
/*     */   
/*     */   public void setPrjMap(Map<String, Object> prjMap) {
/* 290 */     this.prjMap = prjMap;
/*     */   }
/*     */   
/*     */   public String getPdfStatus() {
/* 294 */     return this.pdfStatus;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPdfStatus(String pdfStatus) {
/* 299 */     if (pdfStatus == null) {
/* 300 */       this.pdfStatus = null;
/*     */     } else {
/* 302 */       this.pdfStatus = pdfStatus;
/*     */     } 
/*     */   }
/*     */   
/*     */   public String getPdfFileCode() {
/* 307 */     return this.pdfFileCode;
/*     */   }
/*     */   
/*     */   public void setPdfFileCode(String pdfFileCode) {
/* 311 */     this.pdfFileCode = pdfFileCode;
/*     */   }
/*     */ }


/* Location:              D:\文件\123\WEB-INF\classes\!\com\iris\egrant\webapp\struts2\proposal\EnterAction.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */